import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:get/get_navigation/src/routes/route_middleware.dart';
import 'package:rembercount/controller/authLoginController.dart';




 class Appmiddleware extends GetMiddleware {
  @override
  int? get priority => 1;
    
  @override
  RouteSettings? redirect(String? route) {
    Authlogincontroller authlogincontroller=Get.find<Authlogincontroller>();
    // Check if the user is logged in

    if (!authlogincontroller.isLogin.value) {
      return RouteSettings(name: '/login');
    }
    return null;
  }
  
}